package exception;

import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseableDemo {
    public static void main(String[] args) {
        System.out.println("开始了");

        try(
           FileOutputStream fos=new FileOutputStream("fos.dat")
        ) {
            fos.write(48);
        }catch (IOException e){

        }
        System.out.println("结束了");
    }
}
